package com.horizon.wxapp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.horizon.wxapp.dao.CategoriesMapper;
import com.horizon.wxapp.entity.Categories;
import com.horizon.wxapp.service.CategoriesService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CategoriesServiceImpl implements CategoriesService {

    @Resource
    private CategoriesMapper categoriesMapper;

    @Override
    public List<Categories> getCategoryByTitle(String title) {
        return categoriesMapper.selectList((new LambdaQueryWrapper<Categories>()).like(Categories::getTitle, title));
    }
}
